<script type="text/javascript">
	jQuery(document).ready(function(){
		jQuery("#validate_cus").validationEngine();
		jQuery("#validate_appl").validationEngine();
	});
	var amount_visa				=	<?php echo $contact_info['amount_visa']; ?>;
	var airfast_track_fee		=	<?php echo $airfast_track_fee;?>;
	var total_airfast_track_fee	=	<?php echo $total_airfast_track_fee;?>;
	var carpick_up_fee			=	<?php echo $carpick_up_fee;?>;
	var total_visa_fee			=	<?php echo $total_visa_fee;?>;
	var total_processing_fee	=	<?php echo $total_processing_fee;?>;
	var type_visa				=	'<?php echo $contact_info['type_visa'];?>';
</script>

	<div id="inner">
        <div class="wrap">
            <div id="main">    
				<div id="custom-care-block" class="custom-care-widget custom-care-on-top">
					<div class="supporter-info info">
						<a href="https://livechat.boldchat.com/aid/527608051372187996/bc.chat?cwdid=4557253158656694009" target="_blank" onclick="window.open((window.pageViewer && pageViewer.link || function(link){return link;})(this.href + (this.href.indexOf('?')>=0 ? '&' : '?') + 'url=' + escape(document.location.href)), 'Chat527608051372187996', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=640,height=480');return false;" class="live-chat"><img src="<?php echo base_url();?>public/client/img/livechat.png" alt="Live chat" /></a>
						<p>Custom Care</p>
						<p class="info-name">Ms Jenny Garden</p>
					</div>

					<div class="tel-info info">
						<p class="tel"><span>Tel:</span> +84 985 245</p>
						<p class="hotline"><span>Hotline:</span> +84 946 466 068</p>
					</div>

					<div class="email-info info">
						<span>Email: </span>
						<a href="mailto:support@govietnamvisa.com">support@govietnamvisa.com</a>
					</div>
				</div><!-- end #custom-care-center -->
				
                <div id="content">
                    <div id="step2" class="apply-form step">
                        <div class="step-nav">
                            <h1>Apply online</h1>
                        </div><!-- end .step-nav -->

                        <form action="<?php echo base_url();?>step_3" method="post" class="stepform">
                            <div class="journey-review">
                                <h2>Review your visa application details</h2>

                                <div class="journey-info">
                                    <span><strong>Date of arival: </strong><?php if(isset($contact_info['date_arrival'])){echo $contact_info['date_arrival'];}?></span>
                                    <span><strong>Date of exit: </strong><?php if(isset($contact_info['date_exit'])){echo $contact_info['date_exit'];}?></span>
                                    <span><strong>Flight number: </strong><?php if(isset($contact_info['flight_number'])){echo $contact_info['flight_number'];}?></span>
                                    <span><strong>Arrival Airport: </strong><?php if(isset($contact_info['arrival_port'])){echo $contact_info['arrival_port'];}?></span>
                                    <a href="javascript:void(0)" class='change_customer'>Change</a>
                                </div><!-- end .journey-info -->

                                <div class="applicant-review applicant">
                                    <span class="applicant-icon">Applicants</span>
                                    <table class="review-table form-table" border="0" cellpadding="5px" cellspacing="0">
                                        <thead>
                                            <tr>
                                                <th>No.</th>
                                                <th style="width: 190px">Full name</th>
                                                <th>Date of birth</th>
                                                <th>Nationality</th>
                                                <th>Gender</th>
                                                <th>Passport Number</th>
                                                <th>Passport Expiration Date</th>
                                                <th>Change</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                        	<?php if(count($contact_info) >0 && count($apply_info) >0) {?>
                                        		<?php for($i = 0; $i < $contact_info['amount_visa']; $i++ ){?>
		                                            <tr>
		                                                <td class = "applicant_order_<?php echo $apply_info[$i]->id;?>" value="<?php echo $apply_info[$i]->id; ?>" ><?php if($i < 9){ $j = $i +1; echo '0'.$j;}else{$j=$i+1;echo $j;}?></td>
		                                                <td class = "applicant_name_<?php echo $apply_info[$i]->id;?>"><?php echo $apply_info[$i]->full_name;?></td>
		                                                <td class = "applicant_birth_<?php echo $apply_info[$i]->id;?>"><?php echo $apply_info[$i]->birth_date;?></td>
		                                                <td class = "applicant_nationality_<?php echo $apply_info[$i]->id;?>"><?php echo $apply_info[$i]->nationality;?></td>
		                                                <td class = "applicant_gender_<?php echo $apply_info[$i]->id;?>"><?php echo $apply_info[$i]->gender;?></td>
		                                                <td class = "applicant_passport_<?php echo $apply_info[$i]->id;?>"><?php echo $apply_info[$i]->passport;?></td>
		                                                <td class = "applicant_expiration_<?php echo $apply_info[$i]->id;?>"><?php echo $apply_info[$i]->expiration;?></td>
		                                                <td ><a href="javascript:void(0)" class="change_applicant app-change" id="<?php echo $apply_info[$i]->id ;?>" >Change</a></td>
		                                               
		                                            </tr>
	                                            <?php }?>
                                            <?php }?>
                                        </tbody>
                                    </table>
                                </div><!-- end .applicant-review -->

                                <div class="clearfix"></div>
                            </div><!-- end .journey-review -->

                            <div class="extra-services">
                                <h2>Extra services</h2>
                                <div class="airport-speedup-service extra-service">
                                    <label for="airport-service">Airport speedup</label>
                                    <input type="checkbox" id="airport-service" name="extra_services[]" value="airport_speedup" />
                                    <span class="tooltip" title="Our fast track service helps to save your time on queuing at Immigration counter at Vietnam Airports. Our representative will pick you up and accomplish your task, doing all entry procedure when your flight land off.  Using our assistant service, you will be charged 30 USD/ pax excluding stamping fee."><img src="<?php echo img_link('icon_help.png', 'client');?>" title="" alt="" class="" id="fullname_note_<?php echo $i;?>" /></span>
                                </div>
                                <div class="car-service extra-service">
                                    	<?php 
                                    	 switch($number_applicants){
								            case ($number_applicants >=1 && $number_applicants <= 2):
										        $car_seat		= 4; 		
										        break;
										    case ($number_applicants >=3 && $number_applicants <= 5):
										        $car_seat		= 7;
										        break;
										    case ($number_applicants >=6):
										        $car_seat		= 10;
										        break;
								           }
                                    	?>
                                    <label for="car-service">Car pick-up</label>
                                    <input type="checkbox" id="car-service" name="extra_services[]" value="car_pickup" />
                                    <span class="tooltip" title="<?php echo '+$'.$carpick_up_fee.'/'.$car_seat.'-SEAT-CAR<br>For group of '.$number_applicants.'person(s), you will be offered a private '.$car_seat.'-seat-car with the rate of '.$carpick_up_fee.'USD Using the service, you will experience with English speaking drivers who are careful, and well-trained that will expectantly make you feel safely and confidently right your first minutes in Vietnam';?>"><img src="<?php echo img_link('icon_help.png', 'client');?>" title="" alt="" class="" id="fullname_note_<?php echo $i;?>" /></span><br/>
                                </div>
                                <div class="tour-service extra-service">
                                    <label for="tour-service">Tour</label>
                                    <input type="checkbox" id="tour-service" name="extra_services[]" value="tour_booking" />
                                    <span class="tooltip" title="If you want to book a tour, we will contact and consultant to you standard quality tours with no fee"><img src="<?php echo img_link('icon_help.png', 'client');?>" title="" alt="" class="" id="fullname_note_<?php echo $i;?>" /></span><br/>
                                </div>
                                <div class="hotel-service extra-service">
                                    <label for="hotel-service">Hotel</label>
                                    <input type="checkbox" id="hotel-service" name="extra_services[]" value="hotel_booking" />
                                    <span class="tooltip" title="If you want to book hotel, we will contact and consultant to you standard quality hotel with no fee."><img src="<?php echo img_link('icon_help.png', 'client');?>" title="" alt="" class="" id="fullname_note_<?php echo $i;?>" /></span><br/>
                                </div>
                            </div><!-- end .extra-services -->

                            <div class="contact-info">
                                <h2>Service fee & Payment</h2>
                                <table class="review-table form-table" border="0" cellpadding="5px" cellspacing="0">
                                    <thead>
                                        <tr>
                                            <th style="width: 585px">Type of service</th>
                                            <th>Unit price</th>
                                            <th>Total price</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>Visa on arrival - <?php echo $contact_info['type_visa'];?></td>
                                            <td><?php echo $each_visa_fee;?></td>
                                            <td><?php echo $total_visa_fee;?></td>
                                        </tr>
                                        <tr>
                                            <td>Processing time: <?php if(isset($contact_info['services'])){if($contact_info['services'] == 'normal'){echo "Normal (Guaranteed 2 working days)";}else echo "Urgent (Guaranteed 1 working days)";}?></td>
                                            <td><?php if(isset($processing_fee)){echo $processing_fee;}?></td>
                                            <td><?php if(isset($total_processing_fee)){echo $total_processing_fee;}?></td>
                                        </tr>
                                        <tr class = "air_speedup">
                                            <td>Airport fast-track service</td>
                                            <td><?php if(isset($airfast_track_fee)){echo $airfast_track_fee;}?></td>
                                            <td><?php if(isset($total_airfast_track_fee)){echo $total_airfast_track_fee;}?></td>
                                        </tr>
                                        <tr class = "car_pickup">
                                            <td>Car pick-up</td>
                                            <td><?php if(isset($carpick_up_fee)){echo $carpick_up_fee;}?></td>
                                            <td><?php if(isset($carpick_up_fee)){echo $carpick_up_fee;}?></td>
                                        </tr>
                                        <tr class="total-review">
                                            <td colspan="2">Total</td>
                                            <td><span class="total-price"><?php if(isset($total_processing_fee) && isset($total_visa_fee)){ echo $total_visa_fee + $total_processing_fee. " USD";}?></span></td>
                                        </tr>
                                    </tbody>
                                </table>

                                <div class="payment-select">
                                    <span class="payment-icon">Select your payment</span>
                                    <div class="payment-choice">
                                        <input type="radio" value="onepay" name="payment" id="payment-onepay" />
                                        <label for="payment-visa">Onepay</label>
                                        <br/>
                                        <br/>
                                        <input type="radio" value="paypal" name="payment" checked="checked" id="payment-paypal" />
                                        <label for="payment-paypal">Paypal</label>
                                        <br/>
                                        <br/>
                                        <input type="radio" value="western" name="payment" id="payment-western" />
                                        <label for="payment-western">Western Union</label>
                                        <br/>
                                        <br/>
                                        <input type="radio" value="bankaccount" name="payment" id="payment-western" />
                                        <label for="payment-western">Bank Account</label>
                                    </div>
                                </div>
                                <div id="hidden_information">
                                	<input type="hidden" value="<?php echo $customer_id;?>" name="customer_id_hidden" id="customer_id_hidden" />
                                	<input type="hidden" value="<?php echo $airfast_track_fee;?>" name="airfast_track_hidden" id="airfast_track_hidden" />
                                	<input type="hidden" value="<?php echo $carpick_up_fee;?>" name="carpick_up_hidden" id="carpick_up_hidden" />
                                	<input type="hidden" value="<?php echo $total_visa_fee;?>" name="totalvisa_fee_hidden" id="totalvisa_fee_hidden" />
                                	<input type="hidden" value="<?php echo $total_processing_fee;?>" name="total_processing_fee_hidden" id="total_processing_fee_hidden" />
                                </div>
                            </div><!-- end .contact-info -->
                            <div class="submitwrap">
                                <input type="submit" class="step1-submit step-submit submit" value="Pay now" />
                            </div>
                        </form>
                    </div><!-- end #step1 -->
                </div><!-- end #content -->
            </div><!-- end #main -->
        </div><!-- end .wrap -->
        <div class="clearfix"></div>
    </div><!-- end #inner -->
    <div id="hehe"></div>
    
    <div id="customer_changing" class="white_content toggle-change" >
    	<p class="close" style="float: right;"><a onclick="document.getElementById('customer_changing').style.display='none';document.getElementById('fade').style.display='none'" href="javascript:void(0)"><img src="<?php echo img_link("cancel.png","client")?>" title="" alt="" /></a></p>
    	<div style="clear: both;"></div>
		<div id='ajax-loader' class="none">
			<img src="<?php echo img_link('ajax-loader-4.gif', 'client');?>"/>
		</div>
		<form id="validate_cus" method="post" action="<?php echo base_url();?>apply/change_contact_info">
			<h1>Change Application Details</h1>
			<div class="change_journey_info" >
				<div class="form_line1">
			        <div class="change_arrival_date">
						<label>Date of arrival*</label><br />
						<input type="hidden" class="validate[dateArrivalRequired, arrivalDateRange[arrivalGroup]] text-input datepicker" id="change_arrival_date_hid" value="<?php echo date('m/d/Y');?>"/>
						<input type="text" class="validate[dateArrivalRequired, arrivalDateRange[arrivalGroup]] text-input datepicker" id="change_arrival_date" readonly="readonly" value="<?php echo $contact_info['date_arrival'];?>" name="change_arrival_date" />
					</div>
					<div class="change_exit-date">
						<label>Date of exit*</label><br />
						<div id="change_exit_floor">
							<input type="hidden" class="validate[dateExitRequired, exitDateRange[exitGroup]] text-input datepicker" id="change_exit_date_floor" value="" name="change_exit_date_hid_floor" />
						</div>
						<input type="text" class="validate[dateExitRequired, exitDateRange[exitGroup]] text-input datepicker" id="change_exit_date" value="<?php echo $contact_info['date_exit'];?>" readonly="readonly" name="change_exit_date" />
						<div id="change_exit_ceiling">
							<input type="hidden" class="validate[dateExitRequired, exitDateRange[exitGroup]] text-input datepicker" id="change_exit_date_ceiling" value="" name="change_exit_date_hid_ceiling" />
						</div>
					</div>
					<div class="change_arrival-airport">
						<label>Arrival airport*</label><br />
						<select name="change_arrival_port" id ="change_arrival_port" class="validate[arrivalPortRequired]">
							<option value="Hanoi" <?php if($contact_info['arrival_port'] == "Hanoi"){echo "selected";}?>>Hanoi (Noibai)</option>
							<option value="Hochiminh-Saigon" <?php if($contact_info['arrival_port'] == "Hochiminh-Saigon"){echo "selected";}?>>Hochiminh-Saigon (Tan Son Nhat)</option>
							<option value="Danang" <?php if($contact_info['arrival_port'] == "Danang"){echo "selected";}?>>Danang</option>
						</select>
					</div>
					<div class="change_flight-number">
						<label>Flight number</label><br/>
						<input type="text" name="change_flight_number" id="change_flight_number" value="<?php if(isset($contact_info['flight_number'])){echo $contact_info['flight_number']; } ?>" />
					</div>
					<div>
						<input type="hidden" value="<?php echo $customer_id;?>" name="change_customer_id_hidden" id="change_customer_id_hidden" />
					</div>
				</div>
				<div class="form_line1">
					<div class="change_processing_time">
						<label>Processing time</label> (Hanoi : <span class="clock24s" id="clock24_42659" style="color:#6393C3;">clock for blog</span>)
						<br>
						<input type="radio" <?php if($contact_info['services'] == "normal"){echo "checked";}?> class="change_rush_service" value="normal" name="change_rush_service">
						<span>Normal (Guaranteed 2 working days)</span>
						<br>
						<input type="radio" <?php if($contact_info['services'] == "urgent"){echo "checked";}?> class="change_rush_service" value="urgent" name="change_rush_service">
						<span>Urgent (Guaranteed 1 working day)</span>
					</div>
				</div>
			</div><!-- end .change_journey_info -->
			<br>
	    	<div class="submitwrap"><input type="submit" value="Save & continue" class="submit" /></div>
    	</form> <!-- end #validate_cus -->
   	</div><!-- end #customer_changing -->
    
    <div id="applicant_changing" class="white_content toggle-change">
    	<p class="close" style="float: right;"><a onclick="document.getElementById('applicant_changing').style.display='none';document.getElementById('fade').style.display='none'" href="javascript:void(0)"><img src="<?php echo img_link("cancel.png","client")?>" title="" alt="" /></a></p>
	    <div style="clear: both;"></div>
		<div id='ajax-loader' class="none">
			<img src="<?php echo img_link('ajax-loader-4.gif', 'client');?>"/>
		</div>
    	<h1>Change Applicant's Informations</h1>
    	<form id="validate_appl" method="post" action="<?php echo base_url();?>apply/change_apply_info">
					<div  class="applicant_changing">
						<span class="change_title_appl">Applicant 1</span>
						<span class="abs-arrow"></span>
						<div class="applicant_form_input">
							<div class="form_line">
								<div class="form_fullname">
									<label for="">Full name*</label><br/>
									<input type="text" name="change_full_name" value="" id="change_full_name" class="validate[fullNameRequired] text-input change_full_name" />
								</div>
								<div class="form_date-of-birth">
									<label>Date of birth*</label><i> (mm/dd/yyyy)</i><br />
									<input type="text" class="validate[birthdayRequired] text-input datepicker validate[birthDay[birth1]] change_birth_date" id="change_birth_date" value=""  name="change_birth_date" /> 
									<input type="hidden" class="validate[required] text-input datepicker validate[birthDay[birth1]"  value="<?php echo date('m/d/Y');?>" style="width: 120;" id="change_birth" />
								</div>
								<div class="form_nationality">
									<label for="">Nationality*</label><br />
									<?php if(count($country)>0){?>
										<select name="change_nationality" class="change_nationality" id="change_nationality">
											<?php foreach ($country	as $k => $v){?>
												<option value="<?php echo $v->name;?>" ><?php echo $v->name;?></option>
											<?php }?>
										</select>
									<?php }?>
								</div>
							</div><!-- end .line -->
					
							<div class="form_line">
								<div class="form_passport-no">
									<label for="">Passport Number*</label><br/>
									<input type="text" name="change_passport_number" value="" id="change_passport_number" class="validate[passportRequired,custom[onlyLetterNumber]] text-input change_passport_number" />
								</div>
								<div class="form_expiration-date">
									<label>Passport Expiration Date*</label><br />
									<div id="change_pass_expire">
										<input type="hidden" class='validate[expirepassportRequired] text-input datepicker validate[expirePass[pass_expiration_1]]' id="change_expiration_pass_1" value="<?php echo $month_ex_changing.'/'.$date_ex_changing.'/'.$year_ex_changing ;?>" />
									</div>
									<input type="text" class="validate[expirePassportRequired] text-input datepicker validate[expirePass[pass_expiration_1] change_expiration_pass" id="change_passport_expiration" value="" readonly="readonly"  name="change_passport_expiration" />
								</div>
								<div class="form_gender">
									<label for="">Gender*</label><br />
									<select name="change_gender" class="change_gender">
										<option value="male" >Male</option>
										<option value="female" >Female</option>
									</select>
								</div>
								<div class="form_hid">
									<div class="changing_apply_id"></div>
									<input type="hidden" value="<?php echo $customer_id;?>" name="change_customer_id_hidden" id="change_customer_id_hidden_2" />
								</div>
							</div><!-- end .line -->
							<div class="form_clearfix"></div>
						</div><!-- end .applicant_fomr_input -->
					</div><!-- end #applicant1 -->
					<br>
					<div class="submitwrap"><input type="submit" value="Save & continue" class="submit" /></div>
    	</form>
    </div><!-- end #applicant_changing -->
    <div id="hehe"></div>
    <div id="fade" class="black_overlay"></div>